package org.siberia.server.converter;

import org.siberia.client.bean.UserDTO;
import org.siberia.server.model.User;

public class UserConverter
{	
	public static UserDTO convert(User _user)
	{
		UserDTO user = null;
		
		if ( _user != null )
		{
			user = new UserDTO();
			user.id = _user.id;
			user.username = _user.username;
		}
		
		return user;
	}
	
	public static User convert(UserDTO _user)
	{
		User user = null;
		
		if ( _user != null )
		{
			user = new User();
			user.id = _user.id;
			user.username = _user.username;
		}
		
		return user;
	}
}
